package com.tricode.ile.training.task.sl275.lab6;

public class SavingsAccount extends Account{

    private double interestRate;

    public SavingsAccount(double initBalance, double interestRate) {
        super(initBalance);
        this.interestRate = interestRate;
    }

    public double getInterestRate() {
        return interestRate;
    }

    public void setInterestRate(double interestRate) {
        this.interestRate = interestRate;
    }

    public void accumulateInterest(double balance, double interestRate) {
        balance = balance + (balance * (interestRate/12));
        super.deposit(balance);
    }
}

